# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libburn
pkgver=1.5.6
_ver=${pkgver%_p*}
if [ "$_ver" != "$pkgver" ]; then
	_pver=".pl${pkgver##*_p}"
fi
pkgrel=0
pkgdesc="Library for reading, mastering and writing optical discs"
url="https://dev.lovelyhq.com/libburnia/web/wiki"
arch="all"
license="GPL-2.0-or-later"
makedepends="linux-headers"
subpackages="$pkgname-dev $pkgname-doc"
source="https://files.libburnia-project.org/releases/libburn-${_ver}$_pver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}
package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
549cb25310aac5ce445639374d84f0c09fb1fdd70be97479588775e5afcc12dd0655c5bf51bd3f1bf8c06a66b318fd1e709dcfd72845e795ffaf353ea621accd  libburn-1.5.6.tar.gz
"
